<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>22CSS三角制作梯形布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .box {
            width: 200px;
            height: 30px;
            background: #fff;
            line-height: 30px;
            border: 1px solid red;
            margin: 30px auto;
            text-align: center;
        }
        
        .box .origin {
            color: #ccc;
            font-size: 16px;
            text-decoration: line-through;
        }
        
        .box .seckill {
            position: relative;
            /* display: inline-block; */
            /* 左浮动，右边的原价根据文字环绕效果不用加右浮动 */
            float: left;
            width: 120px;
            height: 100%;
            background: red;
            color: #fff;
            font-size: 24px;
            font-weight: 700;
        }
        
        .box .seckill .triangle {
            position: absolute;
            top: 0;
            right: 0;
            width: 0;
            height: 0;
            line-height: 0;
            font-size: 0;
            /* border-top: 30px solid transparent; */
            /* border-right: 15px solid #fff; */
            border-color: transparent #fff transparent transparent;
            border-style: solid;
            border-width: 30px 15px 0 0;
        }
    </style>
</head>
<div class="box">
    <!-- 秒杀价 -->
    <span class="seckill">￥123
        <!-- 三角 -->
        <i class="triangle"></i>
    </span>
    <!-- 原价 -->
    <span class="origin">￥456</span>
</div>

<body>

</body>

</html>